use fw_path prefix when fallback searching for grub config
authorMark Salter <msalter@redhat.com>
Mon, 9 Jan 2023 23:30:39 +0000 (18:30 -0500)
committerJulian Andres Klode <jak@debian.org>
Sun, 2 Nov 2025 11:08:11 +0000 (12:08 +0100)
commit2c9bae66088b68633424318494a6ea12e5fd88b1
treefe33d26c25cc30621d993fdda904d1ed7da37f69
parentdbcdb62e79a91a6a3657e2370263a57a810f5f42
use fw_path prefix when fallback searching for grub config

When PXE booting via UEFI firmware, grub was searching for grub.cfg in
the fw_path directory where the grub application was found.  If that
didn't exist, a fallback search would look for config file names based
on MAC and IP address.  However, the search would look in the prefix
directory which may not be the same fw_path.  This patch changes that
behavior to use the fw_path directory for the fallback search.  Only if
fw_path is NULL will the prefix directory be searched.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Gbp-Pq: Topic network
Gbp-Pq: Name use-fw_path-prefix-when-fallback-searching-for-grub-config.patch
grub-core/normal/main.c